package ByteStream;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class ByteStreamDemo5 {
/**
 * 文件的拷贝
 *
 */
    public static void main(String[] args) throws IOException {


        FileInputStream pictic = new FileInputStream("C:\\Users\\lenovo\\Pictures\\Saved Pictures\\红底照片.jpg");
        FileOutputStream pictic1 = new FileOutputStream("E:\\Photos\\照片.jpg",true);
        int a = 0;
        while((a = pictic.read()) != -1){
            pictic1.write(a);
        }
        pictic1.close();
        pictic.close();
    }



}
